﻿@using PlaceSystem.App_Start

@model PlaceSystem.Entities.Place

@{
    ViewBag.Title = "Edit";
}

<h2>Edit</h2>


@using (Html.BeginForm())
{
    @Html.AntiForgeryToken()
    @Html.ValidationSummary(true)

    <fieldset class="form-horizontal">
        <legend>Place</legend>

        @Html.HiddenFor(model => model.Id)

        <div class="control-group">
            @Html.LabelFor(model => model.Name, new { @class = "control-label" })
            <div class="controls">
                @Html.EditorFor(model => model.Name)
                @Html.ValidationMessageFor(model => model.Name, null, new { @class = "help-inline" })
            </div>
        </div>

        <div class="control-group">
            @Html.LabelFor(model => model.Description, new { @class = "control-label" })
            <div class="controls">
                @Html.EditorFor(model => model.Description)
                @Html.ValidationMessageFor(model => model.Description, null, new { @class = "help-inline" })
            </div>
        </div>

        <div class="control-group">
            @Html.LabelFor(model => model.City, new { @class = "control-label" })
            <div class="controls">
                @Html.EditorFor(model => model.City)
                @Html.ValidationMessageFor(model => model.City, null, new { @class = "help-inline" })
            </div>
        </div>

        <div class="control-group">
            @Html.LabelFor(model => model.Address, new { @class = "control-label" })
            <div class="controls">
                @Html.EditorFor(model => model.Address)
                @Html.ValidationMessageFor(model => model.Address, null, new { @class = "help-inline" })
            </div>
        </div>

        <div class="control-group">
            @Html.LabelFor(model => model.Capacity, new { @class = "control-label" })
            <div class="controls">
                @Html.EditorFor(model => model.Capacity)
                @Html.ValidationMessageFor(model => model.Capacity, null, new { @class = "help-inline" })
            </div>
        </div>

        <div class="control-group">
            @Html.LabelFor(model => model.Category, new { @class = "control-label" })
            <div class="controls">
                @Html.EnumDropDownListFor(model => model.Category)
                @Html.ValidationMessageFor(model => model.Category, null, new { @class = "help-inline" })
            </div>
        </div>

        @*<div class="control-group">
                @Html.LabelFor(model => model.OwnerId, "OwnerId", new { @class = "control-label" })
                <div class="controls">
                    @Html.DropDownList("OwnerId", String.Empty)
                    @Html.ValidationMessageFor(model => model.OwnerId, null, new { @class = "help-inline" })
                </div>
            </div>*@

        <div class="form-actions no-color">
            <input type="submit" value="Save" class="btn" />
        </div>
    </fieldset>
}

<div>
    @Html.ActionLink("Back to List", "Index")
</div>

@section Scripts {
    @Scripts.Render("~/bundles/jqueryval")
}

